﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CRMTraceTool
{
    public partial class searchForm : Form
    {
        public TraceFile tFile { get; set; }
        public MainForm parent { get; set; }
        public List<string> cNames { get; set; }
        TraceSearch tSearch = new TraceSearch();

        public searchForm(MainForm mForm, List<string> columnNames, TraceFile traceFile)
        {
            tFile = traceFile;
            cNames = columnNames;
            parent = mForm;
            InitializeComponent();
            updateItems();
        }

        private void updateItems()
        {
            columnListBox.DataSource = cNames;
            operatorBox.Items.Add("=");
            operatorBox.Items.Add("Contains");

        }

        private void findButton_Click(object sender, EventArgs e)
        {
            //parent.queryTraceFile(tSearch.queryTraceRecords(tFile, columnListBox.SelectedItem.ToString(), operatorBox.SelectedItem.ToString(), searchItemBox.Text));
        }
    }
}
